/!\ Disclaimer: this work is based and use our own Python package
geodecisionWe present our library in this use case:
- how to use different modules
- how to combine them
- which data to use
We plot our examples with matplotlib to get valid static outputs. For our dynamic and interactiv dashboard, we will create a Bokeh application
We want to create decision-making dashboard tools on the UC Parks (Use Case Parks) Briefly, we want to:
We do this on the following study areas:
Get parks from a bounding box and a key/value query. Data come from OpenStreetMap.
OSM Tile Calculator from Geofabrik can be used to get the bounding box coordinates.
Bounding box arguments must be a tuple of coordinates in EPSG 4326 => (SOUTH, WEST, NORTH, EAST).
The function will return a GeoJSON features collection.
These features can be:
parks.plot(color="green")
<matplotlib.axes._subplots.AxesSubplot at 0x7f30d5a964e0>
In order to measure accessibility to parks, we need to connect them to the street network (which has been transformed into a graph).
First, a brief history of our multiple approaches' attempts and their limits.
Here is a brief history of our reflexions and methodolical approaches to connect the parks to the street network.
| Name | Illustration | Details & Limits | Status |
|---|---|---|---|
| V1 | ![]() |
Slow (lot of spatial requests), arbitrary buffer size, problematic with very long edges | Rejected |
| Name | Illustration | Details & Limits | Status |
|---|---|---|---|
| V2 | ![]() |
Generates a lot of points, must be adapted regarding the size of the park | Rejected |
| Name | Illustration | Details & Limits | Status |
|---|---|---|---|
| V3 | ![]() |
Better than the previous solution but may generate unnecessary nodes and edges | Rejected |
| Name | Illustration | Details & Limits | Status |
|---|---|---|---|
| V4 | ![]() |
Demands a more complicated implementation but is more efficient and precise | Adopted |

Roofs data come from CityGML data, because we can't find this kind of data in the OSM data.
We can apply our Python functions to get roofs and measure:
We parse the local directory with GML files and create GeoJSON files and one GeoJSON file that is a merge of all GeoJSON files.
We also try to get available denomination of buildings.
Data can be found on Grand Lyon open data
print (valid_attr)
Length of Buildings DataFrame: 32286 elements
Number of valid attributes: 667
% of valid attributes: 2 %
/!\ Poor information on buildings attributes. Need to try to find information elsewhere
We can filter and select roofs to get only roofs with potential for the development of park.
Such a roof requires:
We discrimises with (we need to work on these points to justify our choices):
| parameter | value |
|---|---|
| minimum width (meters) | 10 |
| minimum compactness | 0.7 |
| minimum area (m²) | 100 |
| maximum slope (angle) | 30 |
print(roofs_potential)
Number of roofs with potential => 15512
Total number of roofs (study area) => 330945
% of roofs with potential => 5
Total roofs area (m²) => 15725334.177007195
Roofs area with potential (m²) => 5717577.128122902
% of potential roofs area => 36.0
ax = roofs.plot(color="white", label="Roofs",figsize=(10,10))
ax.set_facecolor("black")
selection.plot(color="green", label="Potential roofs", ax=ax)
iso_10_mn = gpd.read_file("./data/iso_cut.gpkg", layer="iso_10", driver="GPKG")
iso_10_mn_3946 = iso_10_mn.to_crs(epsg=3946)
iso_10_mn_3946.plot(ax=ax, color="white", alpha=0.4)
plt.plot()
/home/thomas/anaconda3/envs/space/lib/python3.7/site-packages/pyproj/crs.py:77: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method.
return _prepare_from_string(" ".join(pjargs))
[]
We get the buildings from OpenStreetMap by using the osmnx Python library.
Data need to be cleaned (get rid of non-valid/empty geometries)
Once this done, we will use the analyse's capabilities of the momepy Python library.
For a first analyse, we will use the momepy examples section
/!\ Next operations with
momepywill take time regarding the number of buildings.:=> Read tessellation part in momepy user guide to know how to set parameters and balance precision/memory usage
/!\ WARNING: WE ADD A TRY/EXCEPT in
momepy.distribution.pyat line 553 in NeighborDistance to avoid errors on MultiPolygons
"To calculate the mean distance to neighbouring buildings, we need queen contiguity weights of the first order capturing the relationship between immediate neighbours. Relationship between buildings is here represented by relationships between their tessellation cells" momepy weights examples
import matplotlib.pyplot as plt
bldgs = bldgs.dropna(subset=["neighbour_dist"])
f, ax = plt.subplots(figsize=(10, 10))
bldgs.plot(ax=ax, column='neighbour_dist', scheme='quantiles', legend=True, cmap='magma_r')
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.3, legend=True)
ax.set_facecolor("black")
print(string)
print(string_)
Total number of buildings => 60020
% of buildings with a neighbour distance 0m <= x < 5m => 13 %
% of buildings with a neighbour distance 5m <= x < 10m => 21 %
% of buildings with a neighbour distance 10m <= x < 15m => 17 %
% of buildings with a neighbour distance 15m <= x < 20m => 11 %
% of buildings with a neighbour distance 20m <= x < 25m => 7 %
% of buildings with a neighbour distance 25m <= x < 30m => 5 %
% of buildings with a neighbour distance 30m <= x < 35m => 3 %
% of buildings with a neighbour distance 35m <= x < 40m => 2 %
% of buildings with a neighbour distance 40m <= x < 45m => 2 %
% of buildings with a neighbour distance 45m <= x < 50m => 1 %
Total of classified => 84 %
Remaining => 15 %
f, ax = plt.subplots(figsize=(10, 10))
tessellation.plot(ax=ax, column='gross_coverage', legend=True)
bldgs.plot(ax=ax, color='white', alpha=.5)
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.3, legend=True)
ax.set_facecolor("black")
In this section, we are going to use OpenStreetMap data and osmnx as well as momepy libraries to build a graph from the street network and analyse:
f, ax = plt.subplots(figsize=(10, 10))
edges.plot(ax=ax, linewidth=0.3, color="blue")
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.4, legend=True)
ax.set_facecolor("black")
plt.show()
closeness400 = momepy.nx_to_gdf(primal, points=False)
f, ax = plt.subplots(figsize=(10, 10))
closeness400.plot(ax=ax, column='closeness400', cmap='plasma', scheme='quantiles', k=10, alpha=0.6)
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.4, legend=True)
ax.set_facecolor("black")
ax.set_title('closeness400')
plt.show()
betweenness = momepy.nx_to_gdf(primal, points=False)
f, ax = plt.subplots(figsize=(10, 10))
betweenness.plot(ax=ax, column='betweenness_metric_e', cmap='plasma', scheme='quantiles', k=10, alpha=0.6)
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.4, legend=True)
ax.set_facecolor("black")
ax.set_title('betweenness centrality')
plt.show()
straightness = momepy.nx_to_gdf(primal, points=False)
f, ax = plt.subplots(figsize=(10, 10))
straightness.plot(ax=ax, column='straightness', cmap='plasma', scheme='quantiles', k=10, alpha=0.6)
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.4, legend=True)
ax.set_facecolor("black")
ax.set_title('straightness')
plt.show()
We use osmnx and momepy diversity.
"The Theil index is a statistic primarily used to measure economic inequality and other economic phenomena, though it has also been used to measure racial segregation" (Wikipedia)
f, ax = plt.subplots(figsize=(10, 10))
tessellation.plot(ax=ax, column='area_Theil_ID', scheme='fisherjenkssampled', k=10, legend=True, cmap='plasma')
bldgs.plot(ax=ax, color="white", alpha=0.4)
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.4, legend=True)
ax.set_facecolor("black")
plt.show()
/home/thomas/anaconda3/envs/space/lib/python3.7/site-packages/mapclassify/classifiers.py:482: UserWarning: Deprecated (2.1.0): Fisher_Jenks is being renamed to FisherJenks. Fisher_Jenks will be removed on 2020-01-31. warn(self.message)
"The Simpson index was introduced in 1949 by Edward H. Simpson to measure the degree of concentration when individuals are classified into types" (Wikipedia)
f, ax = plt.subplots(figsize=(10, 10))
tessellation.plot(ax=ax, column='area_simpson', legend=True, cmap='viridis')
bldgs.plot(ax=ax, color="white", alpha=0.4)
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.4, legend=True)
ax.set_facecolor("black")
plt.show()
INSEE 1km & 200m gridded data
| Name | Provider | License & terms of use | Warnings | Documentation | Variables |
|---|---|---|---|---|---|
| Gridded data (1km) FiLoSoFi | INSEE | Link | INSEE Warnings (fr) | Link | Dictionary of variables |
| Gridded data (200m) FiLoSoFi | INSEE | Link | INSEE Warnings (fr) | Link | Dictionary of variables |
| Field | Details |
|---|---|
| IdINSPIRE | Identifiant Inspire du carreau de 200 m |
| I_est_cr | Vaut 1 si le carreau de 200 m est imputé par une valeur approchée, 0 sinon |
| Id_carr_n | Identifiant Inspire du carreau de niveau naturel auquel appartient le carreau de 200 m |
| Groupe | Numéro du groupe auquel appartient le carreau (voir documentation) |
| Depcom | Code commune, selon le code officiel géographique 2019, auquel sont rattachés la majorité des ménages du carreau |
| Id_car2010 | Identifiant Inspire du carreau de 200 m figurant dans la base de données carroyées à 200 m diffusée avec la source RFL2010 (le nombre de caractères peut être différent de celui de IdINSPIRE) |
| Id_carr1km | Identifiant Inspire du carreau de 1 km auquel appartient le carreau de 200 m |
| I_pauv | Nombre de carreaux de 200 m compris dans le carreau de 1 km qui ont été traités pour respecter la confidentialité sur le nombre de ménages pauvres |
| I_est_1km | Vaut 1 si le carreau est imputé par une valeur approchée, 0 ou 2 sinon |
| Ind | Nombre d’individus |
| Men | Nombre de ménages |
| Men_pauv | Nombre de ménages pauvres |
| Men_1ind | Nombre de ménages d’un seul individu |
| Men_5ind | Nombre de ménages de 5 individus ou plus |
| Men_prop | Nombre de ménages propriétaires |
| Men_fmp | Nombre de ménages monoparentaux |
| Ind_snv | Somme des niveaux de vie winsorisés des individus |
| Men_surf | Somme de la surface des logements du carreau |
| Men_coll | Nombre de ménages en logements collectifs |
| Men_mais | Nombre de ménages en maison |
| Log_av45 | Nombre de logements construits avant 1945 |
| Log_45_70 | Nombre de logements construits entre 1945 et 1969 |
| Log_70_90 | Nombre de logements construits entre 1970 et 1989 |
| Log_ap90 | Nombre de logements construits depuis 1990 |
| Log_inc | Nombre de logements dont la date de construction est inconnue |
| Log_soc | Nombre de logements sociaux |
| Ind_0_3 | Nombre d’individus de 0 à 3 ans |
| Ind_4_5 | Nombre d’individus de 4 à 5 ans |
| Ind_6_10 | Nombre d’individus de 6 à 10 ans |
| Ind_11_17 | Nombre d’individus de 11 à 17 ans |
| Ind_18_24 | Nombre d’individus de 18 à 24 ans |
| Ind_25_39 | Nombre d’individus de 25 à 39 ans |
| Ind_40_54 | Nombre d’individus de 40 à 54 ans |
| Ind_55_64 | Nombre d’individus de 55 à 64 ans |
| Ind_65_79 | Nombre d’individus de 65 à 79 ans |
| Ind_80p | Nombre d’individus de 80 ans ou plus |
| Ind_inc | Nombre d’individus dont l’âge est inconnu |
We have developed a module classification based on the mapclassify from Pysal.
This module allows to measure and determine the best classification and make classes for our data.
This module requires a JSON parameters file as input (with the structure illustrated below)
[{
"name": "name of the futur GeoDataFrame A",
"filepath": "path/to/GeoJSON file",
"variables": {
"variable 1": {
"classification": boolean (if true, make classification, else set to false),
"description": "Short description of the var"
},
"variable 2": {
"classification": boolean (if true, make classification, else set to false),
"description": "Short description of the var"
},
"variable 3": {
"classification": boolean (if true, make classification, else set to false),
"description": "Short description of the var"
}
},
{
"name": "name of the futur GeoDataFrame A",
"filepath": "path/to/GeoJSON file",
"variables": {
"variable 1": {
"classification": boolean (if true, make classification, else set to false),
"description": "Short description of the var"
},
"variable 2": {
"classification": boolean (if true, make classification, else set to false),
"description": "Short description of the var"
},
"variable 3": {
"classification": boolean (if true, make classification, else set to false),
"description": "Short description of the var"
}
}
}
]
serie = "Ind"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Men"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Men_pauv"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Men_1ind"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Men_5ind"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Men_prop"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Ind_snv"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Men_coll"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Men_mais"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Log_av45"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Log_45_70"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Log_70_90"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Log_ap90"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Log_soc"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Ind_0_3"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Ind_4_5"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Ind_6_10"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Ind_11_17"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Ind_18_24"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Ind_25_39"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Ind_40_54"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Ind_55_64"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Ind_65_79"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
serie = "Ind_80p"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()